export function formateDate(val: string) {
  if (!val) {
    return "";
  }
  const complement = function (value: any) {
    return value < 10 ? `0${value}` : value;
  };
  let date = new Date(val);
  let year = date.getFullYear();
  let month = complement(date.getMonth() + 1);
  let day = complement(date.getDate());
  let hour = complement(date.getHours());
  let minute = complement(date.getMinutes());
  let second = complement(date.getSeconds());
  return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
}
